Quiz on Rating API

Test your understanding of the design decisions in an API.

Now that we understand the comment API  design, let’s use what we’ve learned to answer questions on how we would build a rating API.

8

Which option represents the base URL for the rating API that follows the best practices?

Your Answer
A)

Base URL: https://api.example.com/v1/create/ratings

Explanation

This URL doesn’t follow the best practices because it contains the verb create.

B)

Base URL: https://api.example.com/1.v1/rate

Explanation

This URL contains redundant information that does not appear to be correct because it mentions 1 and the version v1 in the wrong way.

Correct Answer
C)

Base URL: https://api.example.com/v1/ratings

Explanation

This URL follows the best practices because it doesn’t contain any verbs, and the version v1 is mentioned correctly.

D)

Base URL: https://api.example.com/create/rating

Explanation

This URL doesn’t follow the best practices because it contains the verb create.

Question 8 of 88 attempted

Comment API Design Evaluation and Latency Budget

Introduction to the Pub-Sub Service